package com.example.slidingmenu;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {
    SlidingMenu menu;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        menu= (SlidingMenu) findViewById(R.id.SlidingMenu);
    }

    public void sliding(View view) {
        //多次点击时候，隐藏显示互相切换
        boolean isshow=menu.isShow();
        if (isshow) {
            //是菜单页面，切换到主页面，下面同理
            menu.hindLeft();
        }else {
            menu.showLeft();
        }
    }
}
